Optimal. Leaf size=153 \[ -\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cosh (x)+b^{2/3} \cosh ^2(x)\right )}{6 a^{5/3}}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cosh (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a}-2 \sqrt [3]{b} \cosh (x)}{\sqrt{3} \sqrt [3]{a}}\right )}{\sqrt{3} a^{5/3}}-\frac{\log \left (a+b \cosh ^3(x)\right )}{3 a}+\frac{\text{sech}^2(x)}{2 a}+\frac{\log (\cosh (x))}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.234748, antiderivative size = 153, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 10, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.667, Rules used = {3230, 1834, 1871, 200, 31, 634, 617, 204, 628, 260} \[ -\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cosh (x)+b^{2/3} \cosh ^2(x)\right )}{6 a^{5/3}}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cosh (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \tan ^{-1}\left (\frac{\sqrt [3]{a}-2 \sqrt [3]{b} \cosh (x)}{\sqrt{3} \sqrt [3]{a}}\right )}{\sqrt{3} a^{5/3}}-\frac{\log \left (a+b \cosh ^3(x)\right )}{3 a}+\frac{\text{sech}^2(x)}{2 a}+\frac{\log (\cosh (x))}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3230
Rule 1834
Rule 1871
Rule 200
Rule 31
Rule 634
Rule 617
Rule 204
Rule 628
Rule 260
Rubi steps
\begin{align*} \int \frac{\tanh ^3(x)}{a+b \cosh ^3(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1-x^2}{x^3 \left (a+b x^3\right )} \, dx,x,\cosh (x)\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{1}{a x^3}-\frac{1}{a x}+\frac{b \left (-1+x^2\right )}{a \left (a+b x^3\right )}\right ) \, dx,x,\cosh (x)\right )\\ &=\frac{\log (\cosh (x))}{a}+\frac{\text{sech}^2(x)}{2 a}-\frac{b \operatorname{Subst}\left (\int \frac{-1+x^2}{a+b x^3} \, dx,x,\cosh (x)\right )}{a}\\ &=\frac{\log (\cosh (x))}{a}+\frac{\text{sech}^2(x)}{2 a}+\frac{b \operatorname{Subst}\left (\int \frac{1}{a+b x^3} \, dx,x,\cosh (x)\right )}{a}-\frac{b \operatorname{Subst}\left (\int \frac{x^2}{a+b x^3} \, dx,x,\cosh (x)\right )}{a}\\ &=\frac{\log (\cosh (x))}{a}-\frac{\log \left (a+b \cosh ^3(x)\right )}{3 a}+\frac{\text{sech}^2(x)}{2 a}+\frac{b \operatorname{Subst}\left (\int \frac{1}{\sqrt [3]{a}+\sqrt [3]{b} x} \, dx,x,\cosh (x)\right )}{3 a^{5/3}}+\frac{b \operatorname{Subst}\left (\int \frac{2 \sqrt [3]{a}-\sqrt [3]{b} x}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx,x,\cosh (x)\right )}{3 a^{5/3}}\\ &=\frac{\log (\cosh (x))}{a}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cosh (x)\right )}{3 a^{5/3}}-\frac{\log \left (a+b \cosh ^3(x)\right )}{3 a}+\frac{\text{sech}^2(x)}{2 a}-\frac{b^{2/3} \operatorname{Subst}\left (\int \frac{-\sqrt [3]{a} \sqrt [3]{b}+2 b^{2/3} x}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx,x,\cosh (x)\right )}{6 a^{5/3}}+\frac{b \operatorname{Subst}\left (\int \frac{1}{a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} x+b^{2/3} x^2} \, dx,x,\cosh (x)\right )}{2 a^{4/3}}\\ &=\frac{\log (\cosh (x))}{a}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cosh (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cosh (x)+b^{2/3} \cosh ^2(x)\right )}{6 a^{5/3}}-\frac{\log \left (a+b \cosh ^3(x)\right )}{3 a}+\frac{\text{sech}^2(x)}{2 a}+\frac{b^{2/3} \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1-\frac{2 \sqrt [3]{b} \cosh (x)}{\sqrt [3]{a}}\right )}{a^{5/3}}\\ &=-\frac{b^{2/3} \tan ^{-1}\left (\frac{1-\frac{2 \sqrt [3]{b} \cosh (x)}{\sqrt [3]{a}}}{\sqrt{3}}\right )}{\sqrt{3} a^{5/3}}+\frac{\log (\cosh (x))}{a}+\frac{b^{2/3} \log \left (\sqrt [3]{a}+\sqrt [3]{b} \cosh (x)\right )}{3 a^{5/3}}-\frac{b^{2/3} \log \left (a^{2/3}-\sqrt [3]{a} \sqrt [3]{b} \cosh (x)+b^{2/3} \cosh ^2(x)\right )}{6 a^{5/3}}-\frac{\log \left (a+b \cosh ^3(x)\right )}{3 a}+\frac{\text{sech}^2(x)}{2 a}\\ \end{align*}
Mathematica [C] time = 1.34983, size = 145, normalized size = 0.95 \[ \frac{-2 \text{RootSum}\left [8 \text{$\#$1}^3 a+\text{$\#$1}^6 b+3 \text{$\#$1}^4 b+3 \text{$\#$1}^2 b+b\& ,\frac{-4 \text{$\#$1}^3 a x+4 \text{$\#$1}^3 a \log \left (e^x-\text{$\#$1}\right )-3 \text{$\#$1}^4 b x+3 \text{$\#$1}^4 b \log \left (e^x-\text{$\#$1}\right )+b \log \left (e^x-\text{$\#$1}\right )-b x}{4 \text{$\#$1}^3 a+\text{$\#$1}^4 b+2 \text{$\#$1}^2 b+b}\& \right ]-6 x+3 \text{sech}^2(x)+6 \log (\cosh (x))}{6 a} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.043, size = 150, normalized size = 1. \begin{align*} -{\frac{1}{3\,a}\sum _{{\it \_R}={\it RootOf} \left ( \left ( a-b \right ){{\it \_Z}}^{3}+ \left ( -3\,a-3\,b \right ){{\it \_Z}}^{2}+ \left ( 3\,a-3\,b \right ){\it \_Z}-a-b \right ) }{\frac{{{\it \_R}}^{2}a-{{\it \_R}}^{2}b-2\,{\it \_R}\,a-4\,{\it \_R}\,b+a+b}{{{\it \_R}}^{2}a-{{\it \_R}}^{2}b-2\,{\it \_R}\,a-2\,{\it \_R}\,b+a-b}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-{\it \_R} \right ) }}+2\,{\frac{1}{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{2}}}+{\frac{1}{a}\ln \left ( \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) }-2\,{\frac{1}{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 13.7488, size = 2763, normalized size = 18.06 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.28494, size = 258, normalized size = 1.69 \begin{align*} -\frac{b \left (-\frac{a}{b}\right )^{\frac{1}{3}} \log \left ({\left | -2 \, \left (-\frac{a}{b}\right )^{\frac{1}{3}} + e^{\left (-x\right )} + e^{x} \right |}\right )}{3 \, a^{2}} + \frac{\log \left (e^{\left (-x\right )} + e^{x}\right )}{a} - \frac{\log \left ({\left | b{\left (e^{\left (-x\right )} + e^{x}\right )}^{3} + 8 \, a \right |}\right )}{3 \, a} + \frac{\sqrt{3} \left (-a b^{2}\right )^{\frac{1}{3}} \arctan \left (\frac{\sqrt{3}{\left (\left (-\frac{a}{b}\right )^{\frac{1}{3}} + e^{\left (-x\right )} + e^{x}\right )}}{3 \, \left (-\frac{a}{b}\right )^{\frac{1}{3}}}\right )}{3 \, a^{2}} + \frac{\left (-a b^{2}\right )^{\frac{1}{3}} \log \left ({\left (e^{\left (-x\right )} + e^{x}\right )}^{2} + 2 \, \left (-\frac{a}{b}\right )^{\frac{1}{3}}{\left (e^{\left (-x\right )} + e^{x}\right )} + 4 \, \left (-\frac{a}{b}\right )^{\frac{2}{3}}\right )}{6 \, a^{2}} - \frac{3 \,{\left (e^{\left (-x\right )} + e^{x}\right )}^{2} - 4}{2 \, a{\left (e^{\left (-x\right )} + e^{x}\right )}^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]